import request from '@/utils/request'

export function login(mobile, password) {
  return request({
    url: '/web/auth/login',
    method: 'post',
    data: {
      mobile,
      password
    }
  })
}

export function logout(token){
  return request({
    url: '/web/auth/logout',
    method: 'post',
    data: {
      token: token
    }
  })
}

export function getInfo() {
  return request({
    url: '/web/user/info',
    method: 'post'
  })
}

export function register(data) {
  return request({
    url: '/web/auth/register',
    method: 'post',
    data
  })
}

export function retrieve(data) {
  return request({
    url: '/web/auth/findBackPwd',
    method: 'post',
    data
  })
}

export function verifyCode(mobile) {
  return request({
    url: '/web/verify/register',
    method: 'post',
    data:{
      mobile
    }
  })
}
